import request from '@/utils/request'
const baseURL = process.env.VUE_APP_SPECIES_API
const apiURL = baseURL + '/opa-api/admin/v1/exch_item'
/**
 * 查询兑换物
 * http://showdoc.wisetimes.cn:4999/web/#/235/1989
 * sXVmZsEJ
 * @param {*} params
 * @returns
 */
export function listExchItem (params) {
  return request({
    url: apiURL,
    method: 'get',
    params
  })
}

/**
 * 新增/修改兑换物
 * http://showdoc.wisetimes.cn:4999/web/#/235/1988
 * sXVmZsEJ
 * @param {*} data
 * @returns
 */
export function updateExchItem (data) {
  return request({
    url: apiURL,
    method: 'post',
    data
  })
}

/**
 * 删除兑换物
 * http://showdoc.wisetimes.cn:4999/web/#/235/1990
 * sXVmZsEJ
 * @param {*} data
 * @returns
 */
export function delExchItem (id) {
  return request({
    url: apiURL + '?id=' + id,
    method: 'delete'
  })
}
